<template>
  <div>
    <el-row>
      <el-col :span="24">
        <div class="addccc">
          <el-button type="primary" icon="el-icon-circle-plus-outline"
            >上传</el-button
          >
          <el-radio-group v-model="type" size="small" style="margin-left: 15px">
            <el-radio-button label="全部"></el-radio-button>
            <el-radio-button
              v-for="item in typeData"
              :key="item.value"
              :label="item.label"
              @tab-click="waterfall"
            ></el-radio-button>
          </el-radio-group>
        </div>
      </el-col>
      <el-col :span="24">
        <div>
          <el-table :data="tableData" border style="width: 100%">
            <el-table-column prop="date" label="名称" width="">
            </el-table-column>
            <el-table-column prop="name" label="版本" width="">
            </el-table-column>
            <el-table-column prop="date1" label="版本类别" width="">
            </el-table-column>
            <el-table-column prop="address" label="文件大小"> </el-table-column>
            <el-table-column prop="address1" label="上传时间">
            </el-table-column>
            <el-table-column prop="address2" label="备注"> </el-table-column>
            <el-table-column label="操作" width="220" align="center">
              <template #default="scope">
                <el-button
                  size="mini"
                  @click="handleEdit(scope.$index, scope.row)"
                  >编辑</el-button
                >
                <el-button
                  size="mini"
                  type="danger"
                  @click="handleDelete(scope.$index, scope.row)"
                  >下载</el-button
                >
                <el-button
                  size="mini"
                  type="danger"
                  @click="handleDelete(scope.$index, scope.row)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      type: "全部",
      typeData: [
        {
          value: 0,
          label: "合同",
        },
        {
          value: 1,
          label: "单据",
        },
        {
          value: 2,
          label: "备忘录",
        },
        {
          value: 3,
          label: "行政",
        },
        {
          value: 4,
          label: "报告",
        },
        {
          value: 5,
          label: "信函",
        },
        {
          value: 6,
          label: "纪要",
        },
        {
          value: 7,
          label: "协议",
        },
        {
          value: 8,
          label: "方案",
        },
      ],
      tableData: [
        {
          date: "供应商品质承诺书",
          name: "v1.0.2",
          date1: "协议",
          address: "0.09M",
          address1: "2021/5/1",
          address2: "	供应商品质承诺书模板",
        },
      ],
    };
  },

  methods: {
    waterfall() {
      console.log(this.type);
    },
  },
};
</script>

<style scoped>
.addccc {
  margin-bottom: 20px;
}
</style>